import request from '@/utils/request'
const prefix = '/identityService/api/identityServer/'
export function CreateClient(data) {
  return request({
    url: prefix + 'CreateClient',
    method: 'post',
    data
  })
}
export function UpdateClient(data) {
  return request({
    url: prefix + 'UpdateClient',
    method: 'put',
    data
  })
}
export function DeleteClient(data) {
  return request({
    url: prefix + 'DeleteClient',
    method: 'delete',
    data
  })
}
export function GetClient(params) {
  return request({
    url: prefix + 'GetClient',
    method: 'get',
    params
  })
}
export function GetClientList(params) {
  return request({
    url: prefix + 'GetClientPagedList',
    method: 'get',
    params
  })
}

export function CreateApiResource(data) {
  return request({
    url: prefix + 'CreateApiResource',
    method: 'post',
    data
  })
}
export function UpdateApiResource(data) {
  return request({
    url: prefix + 'UpdateApiResource',
    method: 'put',
    data
  })
}
export function DeleteApiResource(data) {
  return request({
    url: prefix + 'DeleteApiResource',
    method: 'delete',
    data
  })
}
export function GetApiResource(params) {
  return request({
    url: prefix + 'GetApiResource',
    method: 'get',
    params
  })
}
export function GetApiResourceList(params) {
  return request({
    url: prefix + 'GetApiResourcePagedList',
    method: 'get',
    params
  })
}

export function CreateApiScope(data) {
  return request({
    url: prefix + 'CreateApiScope',
    method: 'post',
    data
  })
}
export function UpdateApiScope(data) {
  return request({
    url: prefix + 'UpdateApiScope',
    method: 'put',
    data
  })
}
export function DeleteApiScope(data) {
  return request({
    url: prefix + 'DeleteApiScope',
    method: 'delete',
    data
  })
}
export function GetApiScope(params) {
  return request({
    url: prefix + 'GetApiScope',
    method: 'get',
    params
  })
}
export function GetApiScopeList(params) {
  return request({
    url: prefix + 'GetApiScopePagedList',
    method: 'get',
    params
  })
}

export function CreateIdentityResource(data) {
  return request({
    url: prefix + 'CreateIdentityResource',
    method: 'post',
    data
  })
}
export function UpdateIdentityResource(data) {
  return request({
    url: prefix + 'UpdateIdentityResource',
    method: 'put',
    data
  })
}
export function DeleteIdentityResource(data) {
  return request({
    url: prefix + 'DeleteIdentityResource',
    method: 'delete',
    data
  })
}
export function GetIdentityResource(params) {
  return request({
    url: prefix + 'GetIdentityResource',
    method: 'get',
    params
  })
}
export function GetIdentityResourceList(params) {
  return request({
    url: prefix + 'GetIdentityResourcePagedList',
    method: 'get',
    params
  })
}

export function GetAllResources(params) {
  return request({
    url: prefix + 'GetAllResources',
    method: 'get',
    params
  })
}
